package com.beando.catchit;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ImageButton button1=(ImageButton) findViewById(R.id.ImageButton01);
        button1.setOnClickListener(lstBtn1);
        ImageButton button2=(ImageButton) findViewById(R.id.ImageButton02);
        button2.setOnClickListener(lstBtn2);
    }
    private OnClickListener lstBtn1=new OnClickListener(){
    	public void onClick(View v){
    		ImageButton button2=(ImageButton) findViewById(R.id.ImageButton02);
    		button2.setBackgroundDrawable((R.drawable.icon));
    	}
    };
    private OnClickListener lstBtn2=new OnClickListener(){
    	public void onClick(View v){
    		Button button1=(Button) findViewById(R.id.ImageButton01);
    		button1.setBackgroundDrawable(R.drawable.cup);
    	}
    };
}